﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<KLS.PPDS.Web.Models.PublicationViewModel>" %>
<%@ Import Namespace="KLS.PPDS.Resources" %>
<%@ Import Namespace="MvcContrib.UI.Grid" %>
<%@ Import Namespace="KLS.PPDS.Utility.Html" %>




    <% Html.Grid(Model.Publications).Columns(column=>
                                              {
                                                  column.For(c => c.Id).Named(CommonString.Id);
                                                  column.For(c => c.PublicationName.Wrap(65," ")).Named(CommonString.Name).Encode(false);
                                                  column.For(c => c.PublicationNumber).Named(CommonString.Number);
                                                  column.For(c => c.MonthName).Named(CommonString.Month);
                                                  column.For(c => c.Year).Named(CommonString.Year);
                                                  column.For(c => c.Pages).Named(CommonString.Pages);

                                                  //column.For(c => Html.TextBox(CommonString.Storyboard, CommonString.Storyboard, new { @type = "button", @onclick = string.Format("OpenStoryBoard('/Storyboard/Index?publicationId={0}')", c.Id) })).Named(CommonString.Storyboard);
                                                  
                                                  //column.For(c => Html.TextBox(CommonString.Edit, CommonString.Edit, new { @type = "button", @onclick = string.Format("AjaxEditCallWithFormData('Publication/Edit?PublicationId={0}')", c.Id) })).Named(CommonString.Edit).Encode(false);                                                  
                                                  //column.For(c => Html.TextBox(CommonString.Delete, CommonString.Delete, new { @type = "button", @onclick = string.Format("AjaxDeleteCallWithFilter('Publication/Delete?PublicationId={0}')", c.Id) })).Named(CommonString.Delete);                                                  
                                                  //column.For(c => Html.TextBox("Stroryboard", "Stroryboard", new { @type = "button", @onclick = string.Format("AjaxEditCall('Publication/GetStoryBoard/{0}')", c.Id) })).Named(CommonString.Storyboard);
                                                  //column.For(c => Html.TextBox("Edit", "Edit", new { @type = "button", @onclick = string.Format("AjaxEditCallWithFormData('Publication/Edit/{0}')", c.Id) })).Named(CommonString.Edit);
                                                  //column.For(c => Html.TextBox("Delete", "Delete", new { @type = "button", @onclick = string.Format("AjaxDeleteCall('Publication/Delete/{0}')", c.Id) })).Named(CommonString.Delete);


                                              }).RowAttributes(c => new Dictionary<string, object> { { "onClick", string.Format("AjaxEditCallWithFormData('Publication/Edit?PublicationId={0}')", c.Item.Id) } }).Render(); %>

